const sequelize = require("./db");
const {
    DataTypes
} = require('sequelize');


// 标题，发布时间，摘要，具体内容，标签，背景地址
const Blog = sequelize.define('Blog', {
    title: {
        type: DataTypes.STRING,
        allowNull: false,
    },
    publishTime: {
        type: DataTypes.STRING,
        allowNull: false,
    },
    abstract: {
        type: DataTypes.TEXT,
        allowNull: false,
    },
    content: {
        type: DataTypes.TEXT("LONG"),
        allowNull: false,
    },
    bgUrl: {
        type: DataTypes.STRING,
        allowNull: true,
    }
}, {
    createdAt: false,
    updatedAt: false,
    paranoid: true,
});


module.exports = Blog;